
public class VariableHolder {
	
	String[] intNames = new String[25];
	int[] intValues = new int[25];
	int endIntLoc = 0;
	
	
	String[] doubleNames = new String[25];
	double[] doubleValues = new double[25];
	int endDoubleLoc = 0;
	
	String[] stringNames = new String[25];
	String[] stringValues = new String[25];
	int endStringLoc = 0;
	
	String[] booleanNames = new String[25];
	boolean[] booleanValues = new boolean[25];
	int endBooleanLoc = 0;
	
	
	public int findVariableLoc(String variableName, String type){	
		if(type.equals("int")){
			for(int i=0; i < intNames.length; i++){
				if(intNames[i].equals(variableName)){
					return i;
				}
			}
		} else if( type.equals("double")){
			for(int i=0; i < doubleNames.length; i++){
				if(doubleNames[i].equals(variableName)){
					return i;
				}
			}
		} else if( type.equals("String")){
			for(int i=0; i < stringNames.length; i++){
				if(stringNames[i].equals(variableName)){
					return i;
				}
			}
		} else if( type.equals("boolean")){
			for(int i=0; i < booleanNames.length; i++){
				if(booleanNames[i].equals(variableName)){
					return i;
				}
			}
		}
		return -1;
	}
	
	public int getIntegerValue(String variableName){
		return intValues[findVariableLoc(variableName, "int")];
	}
	
	public double getDoubleValue(String variableName){
		return doubleValues[findVariableLoc(variableName, "double")];
	}
	
	// TODO:... same for String and boolean
	
	public int newInt(String variableName, int value){
		intNames[endIntLoc] = variableName;
		intValues[endIntLoc] = value;
		endIntLoc++;
		return value;
	}

	// TODO:... same for String and boolean
	
	public int updateInt(String variableName, int value){
		intValues[findVariableLoc(variableName, "int")] = value;
		return value;
	}
	
	public String getStatusList(String type){
		String retString = "";
		String retInt = "";
		String retDouble = "";
		
		
			for(int i=0; i < endIntLoc; i++){
				String add = "int " + intNames[i] + " = " + intValues[i] + "\n";
				retInt = retInt + add;
			}
			
		if(type.equals("all")){	
			return "";
		} else if(type.equals("int")){
			return retInt;
		}
		
		
		return "";
	}

	// TODO:... same for String and boolean
	
	

	// TODO:... same for String and boolean
	
	// TODO: REMOVE functions
	// TODO: Clear list Functions

	
	// May need to add: Object, long, etc.
	
	
	

}
